package com.example.extenddemo.extendsDemo;

import cn.hutool.extra.spring.SpringUtil;
import com.example.extenddemo.entity.MyMessage;
import org.springframework.stereotype.Component;

@Component
public class MyPublisher {

    public void publish(MyMessage message) {
        SpringUtil.getApplicationContext().publishEvent(message);
    }
}
